<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>

<body>
    <table border="1">
        <caption>用户列表</caption>
        <tr>
            <th>用户名</th>
            <th>密码</th>
            <th>名字</th>
        </tr>
    </table>

    <script>
        let user = [
            { usernaem: "王", pwd: 123456, name: "王冉婷" },
            { usernaem: "池", pwd: 123456, name: "池晓滔" },
            { usernaem: "陈", pwd: 123456, name: "陈亮明" }
        ];
        let table = document.querySelector("table");
        for (let u of user) {
            let tr = document.createElement("tr");
            let td1 = document.createElement("td");
            let td2 = document.createElement("td");
            let td3 = document.createElement("td");
            td1.innerHTML = u.usernaem;
            td2.innerHTML = u.pwd;
            td3.innerHTML = u.name;
            tr.append(td1, td2, td3);
            table.append(tr);
        }

    </script>



</body>

</html>